<html><head><title>SaveVectorState</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">SaveVectorState()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#3A3966"><b>SaveVectorState</b></font>()</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Saves the current vector drawing state to be restored later. Multiple states can be saved 
on a stack and restored in the reverse order they were saved. 
<br>
<br>
The following information is saved with this command: 
<br>
- The coordinate transformations 
<br>
- The drawing source 
<br>
- The drawing font 
<br>
- The clipping path 
<br>
<br>
Note that the current path is <u>not</u> saved by this command. 

</blockquote><p><b>Parameters</b></p><blockquote>
None.

</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Example</b></p><blockquote>


<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, &quot;VectorDrawing&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CanvasGadget</font>(0, 0, 0, 400, 200)
<font color="#3A3966">    LoadFont</font>(0, &quot;Times New Roman&quot;, 20, <font color="#924B72">#PB_Font_Bold</font>)    

    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartVectorDrawing</font>(<font color="#3A3966">CanvasVectorOutput</font>(0))
    
<font color="#3A3966">      VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(255, 0, 0, 255))
<font color="#3A3966">      VectorFont</font>(<font color="#3A3966">FontID</font>(0))
      
<font color="#3A3966">      MovePathCursor</font>(20, 20)
<font color="#3A3966">      DrawVectorText</font>(&quot;Normal text&quot;)
      
      <font color="#3A3966">; Changes made to the drawing state within this block do not affect the other commands</font>
<font color="#3A3966">      SaveVectorState</font>()
<font color="#3A3966">        MovePathCursor</font>(120, 160)
<font color="#3A3966">        RotateCoordinates</font>(120, 160, -50)
<font color="#3A3966">        VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(0, 0, 255, 255))
<font color="#3A3966">        DrawVectorText</font>(&quot;Rotated text&quot;)
<font color="#3A3966">      RestoreVectorState</font>()
      
<font color="#3A3966">      MovePathCursor</font>(220, 140)
<font color="#3A3966">      DrawVectorText</font>(&quot;Normal text&quot;)

<font color="#3A3966">      StopVectorDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="restorevectorstate.html">RestoreVectorState()</a>, <a href="beginvectorlayer.html">BeginVectorLayer()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=rotatecoordinates.html>RotateCoordinates()</a> - <a href="index.html">VectorDrawing Index</a> - <a href="scalecoordinates.html">ScaleCoordinates()</a> -><br><br>

</body></html>